package com.czmini.cztest.service.impl;

import com.czmini.cztest.dao.ZcTestTaskCaseRelMapper;
import com.czmini.cztest.dto.PageTableRequest;
import com.czmini.cztest.dto.PageTableResponse;
import com.czmini.cztest.dto.ResultDto;
import com.czmini.cztest.dto.testcase.QueryZcTestTaskCaseRelDeatilDto;
import com.czmini.cztest.dto.testcase.ZcTestTaskCaseRelDeatilDto;
import com.czmini.cztest.service.ZcTestTaskCaseRelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: cztest
 * @Package: com.czmini.cztest.service.impl
 * @ClassName: ZcTestTaskCaseRelServiceImpl
 * @Author: 还是那个橙子
 * @Description:
 * @Date: 2022/5/14 18:12
 * @Version: 1.0
 */
@Slf4j
@Service
public class ZcTestTaskCaseRelServiceImpl implements ZcTestTaskCaseRelService {

    @Autowired
    private ZcTestTaskCaseRelMapper zcTestTaskCaseRelMapper;


    @Override
    public ResultDto<PageTableResponse<ZcTestTaskCaseRelDeatilDto>>
            listDeatil(PageTableRequest<QueryZcTestTaskCaseRelDeatilDto> pageTableRequest) {

        QueryZcTestTaskCaseRelDeatilDto params = pageTableRequest.getParams();
        //查询
        List<ZcTestTaskCaseRelDeatilDto> zcTestTaskCaseRelDetailDtoList
                = zcTestTaskCaseRelMapper.listDeatil(params, null, null);

        PageTableResponse<ZcTestTaskCaseRelDeatilDto> pageTableResponse = new PageTableResponse<>();
        pageTableResponse.setData(zcTestTaskCaseRelDetailDtoList);

        return ResultDto.success("成功",pageTableResponse);
    }
}
